// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class dialogControl extends cc.Component {

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start () {

    }

    // 设置人名
    setPerson(name: string) {
        this.node.getChildByName('Title').getComponent(cc.Label).string = name;
    }

    // 刷新消息
    setMessage(msg: string) {
        let label = this.node.getChildByName('Content').getComponent(cc.Label);
        label.string = msg;
    }

    // update (dt) {}
}
